set(LINK_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/arm64-v8a)
# load pytorch
# find_package(Torch REQUIRED)
set(PYTORCH_LIBRARY "${LINK_DIRS}/libtorch_cpu.so")
set(C10_LIBRARY "${LINK_DIRS}/libc10.so")
set(PYTORCH_0_LIBRARY "${LINK_DIRS}/libtorch.so")
set(TORCH_GLOBAL_DEPS_LIBRARY "${LINK_DIRS}/libtorch_global_deps.so")

set(PYTORCH_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/pytorch)

# set(PYTORCH_INCLUDE_PATH /home/lin/.local/third-party/libtorch)

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")

# include_directories(${TORCH_INCLUDE_DIRS})
include_directories(${PYTORCH_INCLUDE_PATH}/include
                    ${PYTORCH_INCLUDE_PATH}/include/torch/csrc/api/include)
add_library(task SHARED BartClassifier.cpp)
target_link_libraries(task ${PYTORCH_LIBRARY}
                           ${C10_LIBRARY}
                           ${PYTORCH_0_LIBRARY}
                           ${TORCH_GLOBAL_DEPS_LIBRARY})